using System;
using System.Collections.Generic;
using System.Text;
using XinBang.Entity;
using XinBang.DAL;

namespace XinBang.BLL
{
    public class OrderBL
    {
        private IOrderDA<Order> od = BusinessLogicFactory.GetOrderDA();

        public IList<Order> GetRecentOrders()
        {
            return od.GetRecentOrders();
        }

        public Order GetOrderById(int oid)
        {
            return od.Get(oid);
        }

        public IList<Order> GetNoPayOrders()
        {
            return od.GetNoPayOrders();
        }

        public IList<Order> GetNoPaySendOrders()
        {
            return od.GetNoPaySendOrders();
        }

        public IList<Order> GetPayNoSendOrders()
        {
            return od.GetPayNoSendOrders();
        }

        public IList<Order> GetUnavailableOrders()
        {
            return od.GetUnavailableOrders();
        }

        public IList<Order> GetSendNoReceiveOrders()
        {
            return od.GetSendNoReceiveOrders();
        }

        public IList<Order> GetSendReceiveOrders()
        {
            return od.GetSendReceiveOrders();
        }

        public void UpdateOrder(Order order)
        {
            od.Update(order);
        }

        public void InsertOrder(Order order)
        {
            od.Insert(order);
        }

        public Order GetLastOrderByMember(Member m)
        {
            return od.GetLastOrderByMember(m);
        }

        public IList<Order> GetAllOrdersByMember(Member member)
        {
            return od.GetAllOrdersByMember(member);
        }
    }
}
